﻿package core.ui.options
{
    import core.ui.controls.*;
    import flash.display.*;

    public class CloneOptions extends Sprite implements IToolOptions
    {
        public var bp:BrushPad;
        var opacity:Dropslider;
        var aligned:Checkbox;
        var all:Checkbox;

        public function CloneOptions(param1:Tuyitu)
        {
            var _loc_2:* = 10;
            var _loc_3:* = 15;
            var _loc_4:* = new Literal("rm_brush");
            _loc_4.x = _loc_2;
            _loc_4.y = 2;
            addChild(_loc_4);
            _loc_2 = _loc_2 + _loc_4.width;
            this.bp = new BrushPad(param1);
            this.bp.x = _loc_2;
            this.bp.y = 1;
            addChild(this.bp);
            _loc_2 = _loc_2 + (35 + _loc_3);
            var _loc_5:* = new BarSplit();
            _loc_5.x = _loc_2;
            addChild(_loc_5);
            _loc_2 = _loc_2 + (2 + _loc_3);
            _loc_2 = _loc_2 - 5;
            var _loc_6:* = new Literal("rm_opacity");
            _loc_6.x = _loc_2;
            _loc_6.y = 2;
            addChild(_loc_6);
            _loc_2 = _loc_2 + _loc_6.width;
            this.opacity = new Dropslider(50, 0, 100, 100);
            this.opacity.x = _loc_2;
            this.opacity.y = 2;
            addChild(this.opacity);
            _loc_2 = _loc_2 + (50 + _loc_3);
            var _loc_7:* = new BarSplit();
            _loc_7.x = _loc_2;
            addChild(_loc_7);
            _loc_2 = _loc_2 + (2 + _loc_3);
            this.aligned = new Checkbox("rm_aligned");
            this.aligned.x = _loc_2;
            this.aligned.y = 3;
            addChild(this.aligned);
            _loc_2 = _loc_2 + (this.aligned.width + _loc_3);
            this.all = new Checkbox("rm_sample_all_layers");
            this.all.x = _loc_2;
            this.all.y = 3;
            addChild(this.all);
            return;
        }// end function

        public function get options() : Object
        {
            return {shape:this.bp.shape, opacity:this.opacity.value / 100, aligned:this.aligned.checked, all:this.all.checked};
        }// end function

    }
}
